Jumping over non-stationary objects without problems ... 2-D platformer ... how could this be solved? [on hold]

Posted by help bonafide pigeons on Game Development See other posts from Game Development or by help bonafide pigeons
Published on 2013-10-28T20:08:01Z Indexed on 2013/10/28 22:14 UTC
Read the original article Hit count: 233

You know this problem ... take Super Mario Bros. for example. When Mario/Luigi/etc. comes in proximity with a nearing pipe image an invisible boundary setter must prevent him from continuing forward movement. However, when you jump and move both x and y you are coordinately moving in two dimensions at an exact time. When nearing the pipe in mid-air as you are falling, i.e. implementation of gravity in the computer program "pulling" the image back down, and you do not want them to get "stuck" in both falling and moving.

That problem is solved, but how about this one:

enter image description here

The player controlling the ball object is attempting to jump and move rightwards over the non-stationary block that moves up and down. How could we measure its top and lower x+y components to determine the safest way for the ball to accurately either fall back down, or catch the ledge, or get pushed down under it, etc.?

© Game Development or respective owner

Related posts about collision-detection

Related posts about algorithm